import axios from 'axios'

axios.defaults.baseURL = 'http://localhost:3000'

// 分类页面导航
export const categoryList = () => axios.get(`/category/queryTopCategory`).then(res => res.data)

// 分类二级页面
export const categoryNav = id => axios.get(`/category/querySecondCategory`, { params: { id } }).then(res => res.data)

// 搜索产品
export const quertGoods = obj => axios.get(`/product/queryProduct`, {params: obj}).then(res => res.data)
